home *** CD-ROM | disk | FTP | other *** search
/ Aminet 45 / Aminet 45 (2001)(GTI - Schatztruhe)[!][Oct 2001].iso / Aminet / dev / c / vbcc.lha / vbcc / targets / ppc-warpos / include / stdlib.h < prev    next >
C/C++ Source or Header  |  2001-04-28  |  2KB  |  106 lines

  1. #pragma begin_header
  2. #ifndef __STDLIB_H
  3. #define __STDLIB_H 1
  4.  
  5. #ifndef __SIZE_T
  6. #define __SIZE_T 1
  7. typedef unsigned long size_t;
  8. #endif
  9.  
  10. #ifndef __WCHAR_T
  11. #define __WCHAR_T 1
  12. typedef char wchar_t;
  13. #endif
  14.  
  15. #undef NULL
  16. #define NULL ((void *)0)
  17.  
  18. #undef EXIT_FAILURE
  19. #define EXIT_FAILURE 20
  20. #undef EXIT_SUCCESS
  21. #define EXIT_SUCCESS 0
  22.  
  23. #undef RAND_MAX
  24. #define RAND_MAX 32768
  25.  
  26.  
  27. void exit(int);
  28. #if __STDC_VERSION__ == 199901
  29. void _Exit(int);
  30. #endif
  31. void *malloc(size_t);
  32. void *calloc(size_t,size_t);
  33. void *realloc(void *,size_t);
  34. void free(void *);
  35. int system(const char *);
  36. int rand(void);
  37. void srand(unsigned int);
  38. double atof(const char *);
  39. int atoi(const char *);
  40. long atol(const char *);
  41. #if __STDC_VERSION__ == 199901
  42. long long atoll(const char *);
  43. #endif
  44. double strtod(const char *,char **);
  45. long strtol(const char *,char **,int);
  46. #if __STDC_VERSION__ == 199901
  47. signed long long strtoll(const char *,char **,int);
  48. #endif
  49. unsigned long strtoul(const char *,char **,int);
  50. #if __STDC_VERSION__ == 199901
  51. unsigned long long strtoull(const char *,char **,int);
  52. #endif
  53. void abort(void);
  54. int atexit(void (*)(void));
  55. char *getenv(const char *);
  56. void *bsearch(const void *,const void *,size_t,size_t,int (*)(const void *,const void *));
  57. void qsort(void *,size_t,size_t,int (*)(const void *,const void *));
  58.  
  59. typedef struct {
  60.     int quot,rem;
  61. } div_t;
  62.  
  63. typedef struct {
  64.     long quot,rem;
  65. } ldiv_t;
  66.  
  67. #if __STDC_VERSION__ == 199901
  68. typedef struct {
  69.     long long quot,rem;
  70. } lldiv_t;
  71. #endif
  72.  
  73. div_t div(int,int);
  74. ldiv_t ldiv(long,long);
  75. #if __STDC_VERSION__ == 199901
  76. lldiv_t lldiv(long long,long long);
  77. #endif
  78.  
  79. int abs(__reg("r3") int) =
  80.                 "\tcmpwi\tr3,0\n"
  81.                 "\tbge\t$+8\n"
  82.                 "\tneg\tr3,r3\n"
  83.                 "#barrier";
  84. long labs(__reg("r3") long) =
  85.                 "\tcmpwi\tr3,0\n"
  86.                 "\tbge\t$+8\n"
  87.                 "\tneg\tr3,r3\n"
  88.                 "#barrier";
  89. #if __STDC_VERSION__ == 199901
  90. long long llabs(long long);
  91. #endif
  92.  
  93. extern size_t _nalloc;
  94.  
  95. #define atof(s) strtod((s),(char **)NULL)
  96. #define atoi(s) (int)strtol((s),(char **)NULL,10)
  97. #define atol(s) strtol((s),(char **)NULL,10)
  98.  
  99. struct __exitfuncs{
  100.     struct __exitfuncs *next;
  101.     void (*func)(void);
  102. };
  103.  
  104. #endif
  105. #pragma end_header
  106.